package task01;

/**
 * @author Administrator
 * 测试类，调用对象的方法
 */
public class CESHI_people {
    public static void main(String[] args) {
//        创建person类型的对象p1
      People_gouzao_static p1=new People_gouzao_static();
//      调用静态对象static,全局都可以使用
        People_gouzao_static.cou= "中国";
        System.out.println(People_gouzao_static.cou);



//      调用对象的属性和方法

        p1.eat();
        p1.speak();
        p1.hobby();
        p1.setAge(25);
        System.out.println("p1的对象是"+p1.getAge());
        System.out.println("p1的国籍是"+People_gouzao_static.cou);
People_gouzao_static p2=new People_gouzao_static("张三",18);
        System.out.println();
p2.eat();

    }



}
